<?php $url = new Url();?>
<div id="main">
    <form action="" method="get">
    <div id="sidebar">        
        <h3>Dự án</h3>
        <label for="closed"><input id="closed" name="closed" type="checkbox" value="view" <?php if(isset($_GET['closed'])){echo "checked";} ?> >Xem các dự án đã đóng</label>
        <p><input class="button-small" type="submit" value="Áp dụng"></p>        
    </div>
    </form>
    <div id="content">
        <?php if(isset($_SESSION['user_pm'])){ ?>
        <div class="contextual">
            <a class="icon icon-add" href="<?php echo $url->createUrl("project/add"); ?>">Dự án mới</a>
        </div>
        <?php } ?>

        <h2>Dự án</h2>

        <div id="projects-index">
            <ul class="projects root">

                <?php foreach($data as $row){ ?>
                    <li class="root">
                        <div class="root">
                            <a href="<?php echo $url->createUrl("project/info",array("project_id"=>$row['project_id'])); ?>" class="project root parent "><?php echo $row['project_name']; ?></a>
                            <?php if($row['project_status'] == 0){ ?> (đã kết thúc) <? } ?>
                            <div class="wiki description"><p><?php echo $row['project_description']; ?></p></div>
                        </div>                    
                    </li>      
                    <?php } ?>                

            </ul>
        </div>            
        <div style="clear:both;"></div>
    </div>
</div>